<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <input type="button" value="点击" @click="justDo('IT','程序员')">
    <input type="text" @keyup.enter="doIt">

</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    var app = new Vue({
        el:'#app',
        methods:{
            justDo:function (a,b) {
                alert('just do '+a+b)
            },
            doIt:function () {
                alert('只做IT')
            }
        }
    })

</script>
</body>
</html>